home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / plug-ins / print / print_gimp.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-05-08  |  3.4 KB  |  107 lines

  1. /*
  2.  * "$Id: print_gimp.h,v 1.4.2.1 2002/05/08 09:26:22 neo Exp $"
  3.  *
  4.  *   Print plug-in for the GIMP.
  5.  *
  6.  *   Copyright 1997-2000 Michael Sweet (mike@easysw.com),
  7.  *    Robert Krawitz (rlk@alum.mit.edu). and Steve Miller (smiller@rni.net
  8.  *
  9.  *   This program is free software; you can redistribute it and/or modify it
  10.  *   under the terms of the GNU General Public License as published by the Free
  11.  *   Software Foundation; either version 2 of the License, or (at your option)
  12.  *   any later version.
  13.  *
  14.  *   This program is distributed in the hope that it will be useful, but
  15.  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  16.  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17.  *   for more details.
  18.  *
  19.  *   You should have received a copy of the GNU General Public License
  20.  *   along with this program; if not, write to the Free Software
  21.  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22.  *
  23.  *
  24.  * Revision History:
  25.  *
  26.  *   See ChangeLog
  27.  */
  28.  
  29. #ifndef __PRINT_GIMP_H__
  30. #define __PRINT_GIMP_H__
  31.  
  32. #ifdef __GNUC__
  33. #define inline __inline__
  34. #endif
  35.  
  36. /*
  37.  * All Gimp-specific code is in this file.
  38.  */
  39.  
  40. #define PLUG_IN_VERSION        "4.2"
  41. #define PLUG_IN_NAME        "Print"
  42.  
  43. typedef struct        /**** Printer List ****/
  44. {
  45.   int    active;            /* Do we know about this printer? */
  46.   char    name[128];        /* Name of printer */
  47.   stp_vars_t v;
  48. } gp_plist_t;
  49.  
  50. #define THUMBNAIL_MAXW    (128)
  51. #define THUMBNAIL_MAXH    (128)
  52.  
  53. extern gint    thumbnail_w, thumbnail_h, thumbnail_bpp;
  54. extern guchar *thumbnail_data;
  55. extern gint    adjusted_thumbnail_bpp;
  56. extern guchar *adjusted_thumbnail_data;
  57.  
  58. extern stp_vars_t           vars;
  59. extern gint             plist_count;       /* Number of system printers */
  60. extern gint             plist_current;     /* Current system printer */
  61. extern gp_plist_t         *plist;          /* System printers */
  62. extern gint32           image_ID;
  63. extern const gchar     *image_filename;
  64. extern gint             image_width;
  65. extern gint             image_height;
  66. extern stp_printer_t current_printer;
  67. extern gint             runme;
  68. extern gint             saveme;
  69.  
  70. extern GtkWidget *gimp_color_adjust_dialog;
  71. extern GtkWidget *dither_algo_combo;
  72. extern stp_vars_t *pv;
  73.  
  74. /*
  75.  * Function prototypes
  76.  */
  77.  
  78. /* How to create an Image wrapping a Gimp drawable */
  79. extern void  printrc_save (void);
  80.  
  81. extern stp_image_t *Image_GimpDrawable_new(GimpDrawable *drawable);
  82. extern int add_printer(const gp_plist_t *key, int add_only);
  83. extern void initialize_printer(gp_plist_t *printer);
  84. extern void gimp_update_adjusted_thumbnail (void);
  85. extern void gimp_plist_build_combo         (GtkWidget     *combo,
  86.                         gint          num_items,
  87.                         stp_param_t   *items,
  88.                         const gchar   *cur_item,
  89.                         const gchar      *def_value,
  90.                         GtkSignalFunc callback,
  91.                         gint          *callback_id);
  92.  
  93. extern void gimp_invalidate_frame(void);
  94. extern void gimp_invalidate_preview_thumbnail(void);
  95. extern void gimp_do_color_updates    (void);
  96. extern void gimp_redraw_color_swatch (void);
  97. extern void gimp_build_dither_combo  (void);
  98. extern void gimp_create_color_adjust_window  (void);
  99. extern void gimp_update_adjusted_thumbnail   (void);
  100. extern void gimp_create_main_window (void);
  101. extern void gimp_set_color_sliders_active(int active);
  102. extern void gimp_writefunc (void *file, const char *buf, size_t bytes);
  103. extern void set_adjustment_tooltip(GtkObject *adjustment,
  104.                    const gchar *tip, const gchar *private);
  105.  
  106. #endif  /* __PRINT_GIMP_H__ */
  107.